package love.ui.images;

import love.model.ETypeCarte;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.widgets.Display;

public class ImageLoader {

	public static ImageRegistry registry = null;
//	public static Image IMAGE_GUARD 	= null; 
//	public static Image IMAGE_PRIEST 	= null; 
//	public static Image IMAGE_BARON 	= null; 
//	public static Image IMAGE_HANDMAID 	= null; 
//	public static Image IMAGE_PRINCE 	= null; 
//	public static Image IMAGE_KING 		= null; 
//	public static Image IMAGE_COUNTESS 	= null; 
//	public static Image IMAGE_PRINCESS 	= null; 


	public static void initImageRegistry(Display display){
		registry = new ImageRegistry(display); 
		loadImages(registry);
	}
	
	private static void loadImages(ImageRegistry registry) {
		registry.put(""+ETypeCarte.GUARD, ImageDescriptor.createFromFile(ImageLoader.class, "Guard.png"));
		registry.put(""+ETypeCarte.PRIEST, ImageDescriptor.createFromFile(ImageLoader.class, "Priest.png"));
		registry.put(""+ETypeCarte.BARON, ImageDescriptor.createFromFile(ImageLoader.class, "Baron.png"));
		registry.put(""+ETypeCarte.HANDMAID, ImageDescriptor.createFromFile(ImageLoader.class, "Handmaid.png"));
		registry.put(""+ETypeCarte.PRINCE, ImageDescriptor.createFromFile(ImageLoader.class, "Prince.png"));
		registry.put(""+ETypeCarte.KING, ImageDescriptor.createFromFile(ImageLoader.class, "King.png"));
		registry.put(""+ETypeCarte.COUNTESS, ImageDescriptor.createFromFile(ImageLoader.class, "Countess.png"));
		registry.put(""+ETypeCarte.PRINCESS, ImageDescriptor.createFromFile(ImageLoader.class, "Princess.png"));
	}
}
